From 83e8b14bc417fe4570e5fd57b880d10fa0b6aaef Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Mon, 20 Feb 2006 16:08:27 +0000 Subject: [PATCH] Eliminate hard coded items from i386 __xen_guest section to allow the new VMSPLIT_* Kconfig options to work, and to avoid problems when the position of the hypercall page changes. From: Jan Beulich Signed-off-by: Christian Limpach --- .../arch/i386/kernel/head-xen.S | 55 +++++++++++++------ 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S b/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S index 6f8be45843..ca1b8591a7 100644 --- a/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S +++ b/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S @@ -1,23 +1,11 @@ -#include - -.section __xen_guest - .ascii "GUEST_OS=linux,GUEST_VER=2.6" - .ascii ",XEN_VER=xen-3.0" - .ascii ",VIRT_BASE=0xC0000000" - .ascii ",HYPERCALL_PAGE=0x104" /* __pa(hypercall_page) >> 12 */ -#ifdef CONFIG_X86_PAE - .ascii ",PAE=yes" -#else - .ascii ",PAE=no" -#endif - .ascii ",LOADER=generic" - .byte 0 .text +#include #include #include #include +#include #include #include #include @@ -190,12 +178,47 @@ ENTRY(cpu_gdt_table) .org 0x3000 ENTRY(default_ldt) -.org 0x4000 +#define HYPERCALL_PAGE_OFFSET 0x4000 +.org HYPERCALL_PAGE_OFFSET ENTRY(hypercall_page) +.skip 0x1000 -.org 0x5000 /* * Real beginning of normal "text" segment */ ENTRY(stext) ENTRY(_stext) + + +/* + * __xen_guest information + */ +.macro bigutoa value + utoa (\value) >> 12 + .ascii "000" +.endm +.macro utoa value + .if (\value) >= 16 + utoa (\value) >> 4 + .endif + .if (\value) % 16 < 10 + .byte '0' + (\value) % 16 + .else + .byte 'A' + (\value) % 16 - 10 + .endif +.endm + +.section __xen_guest + .ascii "GUEST_OS=linux,GUEST_VER=2.6" + .ascii ",XEN_VER=xen-3.0" + .ascii ",VIRT_BASE=0x" + bigutoa __PAGE_OFFSET + .ascii ",HYPERCALL_PAGE=0x" + utoa ((__PHYSICAL_START+HYPERCALL_PAGE_OFFSET)>>PAGE_SHIFT) +#ifdef CONFIG_X86_PAE + .ascii ",PAE=yes" +#else + .ascii ",PAE=no" +#endif + .ascii ",LOADER=generic" + .byte 0 -- 2.30.2